﻿@model Coticula.Web.Models.Solutions

@{
    ViewBag.Title = "Submit solution";
}

@{
    var pageMenu = new MvcHtmlString[] { Html.ActionLink("Solutions", "Index", "Solution", null, null), };
    ViewBag.PageMenu = pageMenu;
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Solution</legend>
        
        @Html.HiddenFor(model => model.DateTime)
        
        <div class="editor-label">
            @Html.LabelFor(model => model.ProblemId, "Problem")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProblemId")
            @Html.ValidationMessageFor(model => model.ProblemId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Answer)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Answer, new { cols = "60%", rows = "20" })
            @Html.ValidationMessageFor(model => model.Answer)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LanguageId, "Language")
        </div>
        <div class="editor-field">
            @Html.DropDownList("LanguageId")
            @Html.ValidationMessageFor(model => model.LanguageId)
        </div>

        <p>
            <input type="submit" value="Submit" />
        </p>
    </fieldset>
}

